package com.alibaba.citrus.cr.platform.enhance.repository;

import java.util.List;

import com.alibaba.cz.base.tool.page.PageResult;

import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.crplatformenhance.dto.request.IdQueryRequest;
import com.epoch.app.crplatformenhance.sdo.OrganizationRelationSDO;
import com.epoch.app.crplatformenhance.superiorsalesorganizationrelation.model.SuperiorSalesOrganizationRelation;

/**
 * @author zhoubc
 * @description: TODO
 * @date 2021/9/3 14:57
 */
public interface OrganizationRelationRepository {

    /**
     * 新增组织关联信息
     * @param sdo
     * @return
     */
    Boolean addOrganizationRelation(OrganizationRelationSDO sdo);

    /**
     * 编辑组织关联状态
     * @param sdo
     * @return
     */
    Boolean editOrganizationRelationStatus(OrganizationRelationSDO sdo);

    /**
     * 根据组织id查询组织关联信息
     * @param request
     */
    PageResult<List<OrganizationRelationSDO>> getOrganizationRelationByOrgId(IdQueryRequest request);

    /**
     * 根据渠道id查询组织关联信息
     * @param request
     */
    PageResult<List<OrganizationRelationSDO>> getOrganizationRelationByRelevanceId(IdQueryRequest request);

    /**
     * 根据组织id查询对应总部销售组织
     * @param request
     */
    Result<List<SuperiorSalesOrganizationRelation>> getSuperiorSalesOrganizationRelation(IdQueryRequest request);

}
